-- Leviathan (c) v.v.balashoff
local Color = require('libs/colorlibrary/colorlibrary')
local Class = require('leviathan/Class')

local TextComponent = Class:derive('TextComponent')

function TextComponent:new(name, x, y, w, h, text, font, color, align, outlineColor)
    self.id = 'TextComponent'
    self.typeId = 'Renderable'
    self.drawable = true
    self.enabled = true

    self.name = name or self.id
    self.x = x or 0
    self.y = y or 0
    self.w = w or love.graphics.getWidth()
    self.h = h or love.graphics.getHeight()
    self.text = text
    self.font = font
    self.color = color or Color.black
    self.align = align or 'center'
    self.outlineColor = outlineColor or nil
end

return TextComponent
